package com.healthguide.backend.repository;

import com.healthguide.backend.entity.MenstrualCycle;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.List;

@Repository
public interface MenstrualCycleRepository extends JpaRepository<MenstrualCycle, Long> {
    
    List<MenstrualCycle> findByUserIdOrderByStartDateDesc(Long userId);
    
    List<MenstrualCycle> findByUserIdAndStartDateBetween(Long userId, LocalDate startDate, LocalDate endDate);
}
